Environment variables
От | Roy MacGregor Paterson |
---|---|
Тема | Environment variables |
Дата | |
Msg-id | p06010200bbe45b55c783@[192.168.1.102] обсуждение исходный текст |
Ответы |
Re: Environment variables
Environment variables SOLVED |
Список | pgsql-novice |
Thanks to Michael Grant for getting me started (previous question). Here's the conceptual pothole I'm currently in... I want to set up the PATH variable for psql. I might even understand why. I've got a .tcshrc file in my home directory. I know how to modify the .tcshrc file to include the relevant line... "setenv PATH /usr/local/psql/bin" However, .tcshrc already has a PATH variable which I don't want to lose... "setenv PATH "$PATH":/Library/MySQL/bin" So, can I just add the new line to the file? If so, how do psql and MySQL know which is which, given that they have the same name? Or, are they mutually incompatible - I can have one or the other but not both? Or, are multiple PATH variables traversed until something makes sense to whatever it is that reads them? In my csh.login file I have the following PATH variable... "setenv PATH "/bin:/sbin:/usr/bin:/usr/sbin"" ...and if I execute the terminal command "echo $PATH" I get... "/bin:/sbin:/usr/bin:/usr/sbin:/Library/MySQL/bin" ...from this I deduce that I may be able to concatenate the paths in .tcshrc into something like... "setenv PATH "$PATH":/Library/MySQL/bin:/usr/local/psql/bin" ...is this correct? Why is the syntax of these PATH variables different anyway? Is this something specific to each of those programs or does csh/tcsh/unix/macos allow two different syntaxes (syntaxi?) for the setenv command (i.e. is setenv an attribute of tcsh or of psql and MySQL)? Yup, I don't have the O'Reilly book "csh and tcsh". It's nearly 1am in London and the shops are closed. As ever, the two books that I do have are telling me just enough to get me into trouble and not enough to get me out again. What websites should I be looking at to answer these kind of questions without flashing the cash? Apple.com Support just shrugs when I enter tcsh as a query. TIA Roy -- -------------------- Roy MacGregor Paterson MacGregorTech t: +44 (0) 20 7584 7891 f: +44 (0) 20 7589 6223 m: +44 (0) 7803 163 938 w: www.macgregortech.com e: roy@macgregortech.com --------------------
В списке pgsql-novice по дате отправления: